package zhuangtai;

// 测试类
public class ElevatorSystemTest {
    public static void main(String[] args) {
        Elevator elevator = new Elevator();
        
        System.out.println("=== 初始状态 ===");
        System.out.println("当前楼层: " + elevator.getCurrentFloor());
        System.out.println("当前状态: " + elevator.getState().getClass().getSimpleName());
        
        System.out.println("\n=== 测试开门 ===");
        elevator.openDoor();
        System.out.println("当前状态: " + elevator.getState().getClass().getSimpleName());
        
        System.out.println("\n=== 测试关门 ===");
        elevator.closeDoor();
        System.out.println("当前状态: " + elevator.getState().getClass().getSimpleName());
        
        System.out.println("\n=== 测试上升 ===");
        elevator.goUp();
        System.out.println("当前楼层: " + elevator.getCurrentFloor());
        System.out.println("当前状态: " + elevator.getState().getClass().getSimpleName());
        
        System.out.println("\n=== 测试停止 ===");
        elevator.stop();
        System.out.println("当前楼层: " + elevator.getCurrentFloor());
        System.out.println("当前状态: " + elevator.getState().getClass().getSimpleName());
        
        System.out.println("\n=== 测试下降 ===");
        elevator.goDown();
        System.out.println("当前楼层: " + elevator.getCurrentFloor());
        System.out.println("当前状态: " + elevator.getState().getClass().getSimpleName());
        
        System.out.println("\n=== 测试故障 ===");
        elevator.repair();
        System.out.println("当前状态: " + elevator.getState().getClass().getSimpleName());
        
        System.out.println("\n=== 测试维修 ===");
        elevator.repair();
        System.out.println("当前状态: " + elevator.getState().getClass().getSimpleName());
    }
}